package castledefense.logic.pathfinding;

public class PathfindingBuilding extends Pathfinding {

	public PathfindingBuilding(LinkForPathfinding link) {
		super(link);
	}
	
	protected void generateMovementMap(int type) {
		for (int i = 0; i < link.getMapSizeX(); i++) {
            for (int j = 0; j < link.getMapSizeY(); j++) {
                    movementMap[i][j] = link.getConstructionMapBasementValue(i, j);
            }
		}
		for (int i = 0; i < gridMap.getSizeX(); i++) {
			for (int j = 0; j < gridMap.getSizeY(); j++) {
				if(gridMap.get(i, j) != getMovementValue(movementMap[i][j], type)){
					gridMap.set(i, j, getMovementValue(movementMap[i][j], type));
				}
			}
		}
	}

}
